package org.demo.vo.daomapping;

import org.demo.vo.bean.BoolIntNotNull;
import org.telosys.persistence.mapping.AttributeMapping;
import org.telosys.persistence.mapping.BooleanMappedToInt;
import org.telosys.persistence.mapping.EntityMapping;

public class BoolIntNotNullMapping extends EntityMapping<BoolIntNotNull>
{
	private final static Class<BoolIntNotNull> entityClass = BoolIntNotNull.class ;

	private final static String   table   = "BOOLINTNOTNULL" ;

	private final static String   schema  = "ROOT" ;  // Can be null if not required by the database
	
	private final static AttributeMapping[] attributesMapping = new AttributeMapping[]
	{
		new AttributeMapping("id",    "ID",     true,  false, 0 ),  // PK
		new AttributeMapping("name",  "NAME",   false, false, 0 ),
		new AttributeMapping("flag",  "FLAG",   false, false, 0, new BooleanMappedToInt(1,0) )
	};
	
	public BoolIntNotNullMapping() 
	{
		super(entityClass, table, schema, attributesMapping, null, null );
	}

}
